﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AspDatagrid.aspx.cs" Inherits="_513X0018_web08.AspDatagrid" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <h3>
        DataGrid</h3>
    <form id="Form1" runat="server">
    <asp:DataGrid ID="DataGrid1" runat="server" HeaderStyle-BackColor="#cccc99" FooterStyle-BackColor="#cccc99"
        ItemStyle-BackColor="#ff00ff" AlternatingItemStyle-BackColor="#cccccc" DataKeyField="ProductID"
        AutoGenerateColumns="false" OnEditCommand="DataGrid1_Edit" OnCancelCommand="DataGrid1_Cancel"
        OnUpdateCommand="DataGrid1_Update">
        <Columns>
            <asp:BoundColumn HeaderText="Category ID" DataField="CategoryID" />
            <asp:BoundColumn HeaderText="Product Name" DataField="ProductName" />
            <asp:BoundColumn HeaderText="Product Description" DataField="ProductDescription" />
            <asp:BoundColumn HeaderText="Price" DataField="UnitPrice" />
            <asp:EditCommandColumn EditText="Edit" CancelText="Cancel" UpdateText="Update" ItemStyle-Wrap="false"
                HeaderText="Edit" />
        </Columns>
    </asp:DataGrid>
    </form>
</body>
</html>
